<html><head>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8"><title>Trim</title></head>
<body bgcolor="#FFFFDF" link="#009999" vlink="#006666" alink="#006666">
<font face="Arial" size="2"><p align="center"><b><font size="4">Trim()</font></b></p>
<p><b>Syntax</b></p><blockquote>

Result$ = <font color="#006666"><b>Trim</b></font>(String$ [, Character$])</blockquote>

</blockquote>
<b>Description</b><br><blockquote>



Removes all the specified characters located at the beginning and at the end of a string. 

 

</blockquote><p><b>Parameters</b></p><blockquote>
<style type="text/css">
table.parameters { border-spacing: 0px; border-style: none; border-collapse: collapse; }
table.parameters td { border-width: 1px; padding: 6px; border-style: solid; border-color: gray; vertical-align: top; font-family:Arial; font-size:10pt; }
</style>
<table width="90%" class="parameters">
<tr><td width="10%"><i>String$</i></td>
<td width="90%"> 
 
The string to trim. 

 

</td></tr>
<tr><td><i>Character$ (optional)</i></td>
<td> 
 
The character used to trim the string. The default character is 'space'. 
'Character$' has to be a one character length string. 

 

</td></tr>
</table>
</blockquote><p><b>Return value</b></p><blockquote>



A new string holding the original string without the removed characters. 

 

</blockquote><p><b>Example</b></p><blockquote>

<pre><font face="Courier New, Courier, mono"size="2">  <b><font color="#006666">Debug</font></b> <font color="#006666">Trim</font>("   Hello     ")  <font color="#006666">; Will display "Hello"</font>
  <b><font color="#006666">Debug</font></b> <font color="#006666">Trim</font>("!!Hello!!", "!") <font color="#006666">; Will display "Hello"</font>
</font></pre>

</blockquote><p><b>See Also</b></p><blockquote>

<a href="ltrim.html">LTrim()</a>, <a href="rtrim.html">RTrim()</a> 

</Blockquote><p><b>Supported OS  </b><Blockquote>All</Blockquote></p><center>&lt;- <a href=stringfield.html>StringField()</a> - <a href=index.html>String Index</a> - <a href=ucase.html>UCase()</a> -&gt;



</body></html>